package com.ktgj.service.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.service.mapper.ContractLinkActivitycodeMapper;
import com.ktgj.service.domain.ContractLinkActivitycode;
import com.ktgj.service.service.IContractLinkActivitycodeService;

/**
 * 活动码批次明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-03
 */
@Service
public class ContractLinkActivitycodeServiceImpl implements IContractLinkActivitycodeService 
{
    @Autowired
    private ContractLinkActivitycodeMapper contractLinkActivitycodeMapper;

    /**
     * 查询活动码批次明细
     * 
     * @param linkId 活动码批次明细ID
     * @return 活动码批次明细
     */
    @Override
    public ContractLinkActivitycode selectContractLinkActivitycodeById(Long linkId)
    {
        return contractLinkActivitycodeMapper.selectContractLinkActivitycodeById(linkId);
    }

    /**
     * 查询活动码批次明细列表
     * 
     * @param contractLinkActivitycode 活动码批次明细
     * @return 活动码批次明细
     */
    @Override
    public List<ContractLinkActivitycode> selectContractLinkActivitycodeList(ContractLinkActivitycode contractLinkActivitycode)
    {
        return contractLinkActivitycodeMapper.selectContractLinkActivitycodeList(contractLinkActivitycode);
    }

    /**
     * 新增活动码批次明细
     * 
     * @param contractLinkActivitycode 活动码批次明细
     * @return 结果
     */
    @Override
    public int insertContractLinkActivitycode(ContractLinkActivitycode contractLinkActivitycode)
    {
        contractLinkActivitycode.setCreateTime(DateUtils.getNowDate());
        return contractLinkActivitycodeMapper.insertContractLinkActivitycode(contractLinkActivitycode);
    }

    /**
     * 修改活动码批次明细
     * 
     * @param contractLinkActivitycode 活动码批次明细
     * @return 结果
     */
    @Override
    public int updateContractLinkActivitycode(ContractLinkActivitycode contractLinkActivitycode)
    {
        contractLinkActivitycode.setUpdateTime(DateUtils.getNowDate());
        return contractLinkActivitycodeMapper.updateContractLinkActivitycode(contractLinkActivitycode);
    }

    /**
     * 批量删除活动码批次明细
     * 
     * @param linkIds 需要删除的活动码批次明细ID
     * @return 结果
     */
    @Override
    public int deleteContractLinkActivitycodeByIds(Long[] linkIds)
    {
        return contractLinkActivitycodeMapper.deleteContractLinkActivitycodeByIds(linkIds);
    }

    /**
     * 删除活动码批次明细信息
     * 
     * @param linkId 活动码批次明细ID
     * @return 结果
     */
    @Override
    public int deleteContractLinkActivitycodeById(Long linkId)
    {
        return contractLinkActivitycodeMapper.deleteContractLinkActivitycodeById(linkId);
    }
}
